package com.finley.flowabledemo.design.state;


/**
 * @description:
 * @author: xianfei.chao
 * @date 2025/5/31 10:29
 * @version: 1.0
 */
public class WorkStateFactory {

    public static IWorkState getWorkState(WorkContext context) {
        Integer hours = context.getHours();
        if (hours < 12) {
            return new TwelveWorkState();
        }else if (hours < 13) {
            return new ThirteenWorkState();
        }else if (hours < 17) {
            return new SeventeenWorkState();
        }else{
            if (context.getFinish()) {
                return new FinishWorkState();
            }else{
                return new SleepWorkState();
            }
        }
    }
}
